import 'package:flutter/material.dart';

void main() =>runApp(MyApp(
//    items:new List<String>.generate(10, (i)=>"item+$i")


));

class MyApp extends StatelessWidget {

  final List<String> items;

  MyApp({Key key, @required this.items}) :super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: "Row Widgth demo",
        home: Scaffold(
            appBar: AppBar(
              title: Text("Row Widgth demo  水平布局"),
            ),
            body:My4()
        )
    );
  }
}

class My4 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Row(
      children: <Widget>[
        RaisedButton(
          onPressed: (){

          },
          color: Colors.pinkAccent,
          child: Text("read")
          ,
        ),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.lightBlue,
          child: Text("read1")
          ,
        )),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.blueAccent,
          child: Text("read1")
          ,
        )),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        )),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        )),

      ],


    );
  }
}


class My3 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Row(
      children: <Widget>[

        RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        ),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        )),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        )),
   RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        ),

      ],


    );
  }
}